home *** CD-ROM | disk | FTP | other *** search
- Path: in2.uu.net!interaccess!usenet
- From: "Thaddeus L. Olczyk" <Polczyk@interaccess.com>
- Newsgroups: comp.lang.c++
- Subject: Re: C++ vs Delphi 2.0
- Date: 24 Mar 1996 07:40:40 GMT
- Organization: InterAccess, Chicagoland's Full-Service Internet Provider
- Message-ID: <4j2u9o$s0n@nntp.interaccess.com>
- References: <825673272.2083@axiombc.demon.co.uk> <4hmop6$snh@cdshub.cdc.com> <4ims71$oh3@hawk.pix.za> <3152304b.5915048@news.newcastle.edu.au>
- NNTP-Posting-Host: d120.nwchi.interaccess.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22KIT (Windows; U; 16bit)
-
- mazz@faceng.newcastle.edu.au (Richard Mazzaferri) wrote:
-
- > somebody wrote :
- >> >>What about Class Libraries, can we use C++ libraries in Delphi?
- >
-
- >As long as you encapsulate them in a DLL with a straight C interface - this
- >can be annoying, and can lead to programming errors because you tend to
- >pass generic pointers and lose some type checking.
- More importantly you can only pass functions and variables to a dll.
- The class structure of your code will be completely lost.
-
- >
- >> The problem with Delphi is that most people don't seem to realise that
- >> true programming power\flexibility and ease of use are generally
- >> mutually exclusive. Delphi is in Pascal ... which is fundamentally a
- >> teaching language and was never meant as anything more. C++ .exe's
- >> tend to be smaller and faster than Delphi .exe's. Although C++ has no
- >> real standard, it's getting there and it is younger than Pascal.
- >> Pascal tries to be English-like and this it has become pretty rigid.
- >> (This is a personal opinion) to fit smoothly ith OOP. Additionally, if
- >> you use Delphi, you'll find that the general feel of it discourages
- >> one from using code, and directly controlling things. This can't be
- >> good!
- >
- >Have you spent much time using Delphi, say more than ten minutes? Delphi
- >is NOT in Pascal - that statement is like saying that C++ is in C. Delphi
- >is in Object Pascal which is *derived* from Pascal, just like C++ is
- >derived from C. I think you'll find that many creations find uses in the
- >real world beyond the intent of the original author, and that Delphi is not
- >particularly rigid - just uses different syntax and type checking.
- >Delphi's OO is in some ways better than C++ and in other ways not as good.
-
- I have argued in the past and continue to argue now that it is a misnomer
- to call Delphi OO. It partial emulates the C++/Eiffel model of static
- typing, but misses severely by what it keeps out. It partially emulates
- the Smalltalk model of dynamic typing, but in a convoluted way.
-
- >The biggest omissions are multiple inheritance (which can generally be
- >faked with a bit of work) and templates (no workaround :-(. Some of the
-
- Many times a lot of work or virtually impossible.
-
- >big wins are properties and really good exception handling and RTTI. I
- >also find that I generate far fewer bugs in Delphi than I did in C++,
- >probably to do with the type checking.
-
- Or more to do with the fact that you probably wrote C code in C++.
- If you read D&E strong typing is one of the corner stones of C++. I use
- it all the time.
-
- As for you qualities.
- Properties -- A feature of any dll/vbx type architecture. Affects most
- programming very little ( at the cost of some overhead too ).
-
- Exception handling -- a feature of both Delphi and C++ and is used the
- same way in both. Except for one exception, Delphi's model of
- explicitly constructing and destructing objects means that a lot more
- effort is expended to make sure resources are freed ( nested finally
- blocks) .
-
- As for RTTI, it is similar to C++ RTTI , but I believe the
- standards committee considers it a nessecsary evil, because programmers
- can do it themselves quite easily. It is a bad practice
- because it hurts strong type checking. Unfortunately in Delphi
- you have to revert to it often because of the poor object model.
-
- I would say that Delphi is a tool usefull for single programmers, or
- for a small team working on a small (less then three month long ) project.
-
- >
- >I don't understand why it "..discourages one from using code...". I
-
- One of the major selling points of Delphi I hear from most Delphi
- programmers is "isn't it great I can write this application with
- virtually no code".
-
-
- >certainly don't get that feeling. I've been a long time C++ programmer,
- >and the first couple of days with Delphi felt quite strange, because I
- >didn't have the broad knowledge of the entire system that I had with
- >various C++ compilers. After that, it was *very* pleasant and *very*
- >productive. The EXEs tend to suffer from the first couple of hundred of kB
- >of run time library (which is not a big worry in most cases these days),
- >but they are not particularly slow in my experience.
- >
- >Each to his own :-)
- >
- >Have fun,
- > Mazz.
- >mazz@faceng.newcastle.edu.au
-
-
-